home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / TCP_IP / TNOS230S / FORWARD.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-09-06  |  3.4 KB  |  130 lines

  1. #ifndef _FORWARD_H
  2. #define _FORWARD_H
  3.  
  4. #ifndef _MAILBOX_H
  5. #include "mailbox.h"
  6. #endif
  7.  
  8. #ifndef _FWDPARSE_H
  9. #include "fwdparse.h"
  10. #endif
  11.  
  12. /* Defines for the ax.25 forwarding code           */
  13. /* This was moved from the mailbox.h include file. */
  14.  
  15. /* In forward.c: */
  16. int dorevfwd (int argc,char *argv[],void *p);
  17. int dombtimer (int argc,char *argv[],void *p);
  18. int dombkick (int argc,char *argv[],void *p);
  19. char *fwd_bbsname (struct mbx *m);
  20. int fwdinit (struct mbx *m, int try);
  21. void mark_forwarded (FILE *fp,long ind, char thetype);
  22. int makecl (struct mbx *m,int msgn,char const *dest,char *line,char *subj,char *bid,int *bul);
  23. void sendmsg (struct mbx *m,int msgn,char *thebid);
  24. int checksubchannel (struct mbx *m, int assignit);
  25. void releasesubchannel (struct mbx *m);
  26. int cutofffwding (struct mbx *m);
  27.  
  28. /* In fbbfwd.c: */
  29. int dofbbfwd (int argc,char *argv[],void *p);
  30.  
  31. /* In xfwd.c: */
  32. int doxfwd (int argc,char *argv[],void *p);
  33.  
  34. /* In smtpserv.c: */
  35. void statusCtl (const char *who, const char *extension,struct let *info,int entry, int readit);
  36.  
  37.  
  38. #ifdef FBBFWD
  39.  
  40. #define fbbUNKNOWN 0
  41. #define fbbNO      1
  42. #define fbbYES     2
  43. #define fbbDEFER   3
  44.  
  45. #define FBBMAXMSGS 5             /* Maximum number of messages to process for FBB. */
  46. #define XMAXMSGS   25            /* Maximum number of messages to process for X-fwding. */
  47.  
  48.  
  49. /* FBB Packet   */
  50. struct fbbpacket {
  51.      int    number;          /* Message number in mail area.                   */
  52.      int    accept;          /* NotActive = 0 / Reject(-) = 1                  */
  53.                              /* Accept(+) = 2 / Defer(=)  = 3                  */
  54.      int    reject;         /* value returned from reject()               */
  55.      char   fbbcmd[3];       /* FB ( FA when compression is added )            */
  56.      char   type;            /* (B)ulletin, (P)ersonal, (T)raffic/NTS          */
  57.      char   bid[15];         /* Hold makecl() modified bid.                    */
  58.      char   *sline;          /* bufptr that holds the bbs send command         */
  59.                              /* used to enter a message onto the system.       */
  60.      char   *rewrite_to;     /* Place to keep the new, ( via rewrite() to info */
  61.      char   *to;
  62.      char   *from;
  63.      char   *messageid;
  64.      char   *area;
  65.      char   *subject;
  66.      int    size;
  67.      FILE   *fwdfile;
  68.      long   fwdfileindex;
  69. };
  70.  
  71.  
  72. #define FWDFILELEN 132
  73.  
  74. /* A forward entry */
  75. struct fwd {
  76.     struct mbx *m;
  77.     FILE *fwdfile;
  78.     int    sentThisArea;
  79. #ifdef FBBFWD
  80.     char                *tmpBuffer;
  81.     struct fbbpacket    *msglst;
  82.     char                savefsline[MBXLINE+1];
  83.     char                line[MBXLINE+1];
  84.     char                iFile[FWDFILELEN];
  85.     char                oFile[FWDFILELEN];
  86.     struct lzhufstruct  *lzhuf;
  87. #endif
  88. #ifdef XFWD
  89.     char        numtrans;
  90. #endif
  91. };
  92.  
  93. #endif
  94.  
  95.  
  96. /* A Forwarding BBS */
  97. struct bbs      {
  98.         char    name[FWDBBSLEN];
  99.         char    processed;
  100.         char    subchannel;
  101.         time_t    laston;
  102.         time_t    lastactivity;
  103. };
  104.  
  105.  
  106. /* A subchannel structure */
  107. struct subchan {
  108.     int    limit;
  109.     int    used;
  110.     char    *description;
  111. };
  112.  
  113. extern struct subchan *subchannels;
  114.  
  115. #ifdef FBBCMP
  116. #include "lzhuf.h"
  117. #else
  118. #include "hardware.h"
  119. #endif
  120.  
  121. #ifdef MBFWD
  122. extern int FWDareatrace;
  123. #endif
  124.  
  125. #ifdef ALTERBID
  126. extern int chkBidAltered, holdBidAltered;
  127. #endif
  128.  
  129. #endif  /* FORWARD_H */
  130.